package com.sdp.wx.db.wx_metering_utensil_record.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 *
 * </p>
 *
 * @author zsp
 * @since 2024-02-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wx_metering_utensil_record")
public class WxMeteringUtensilRecord extends Model<WxMeteringUtensilRecord> {

    private static final long serialVersionUID=1L;

    /**
     * 内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 设备内码id
     */
    @TableField("device_id")
    private String deviceId;

    /**
     * 鉴定证书
     */
    @TableField("identify_certificate")
    private String identifyCertificate;

    /**
     * 鉴定时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("identify_time")
    private LocalDate identifyTime;

    /**
     * 有效期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("effective_time")
    private LocalDate effectiveTime;

    /**
     * 备注
     */
    @TableField("identify_notes")
    private String identifyNotes;


    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
